package com.gxuwz.medical.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import com.gxuwz.medical.domain.chronicdis.Chronicdis;
import com.gxuwz.medical.domain.chronicinfo.ChronicInfo;
import com.gxuwz.medical.domain.person.Person;
import com.gxuwz.medical.domain.policy.Policy;
import com.gxuwz.medical.domain.reducttreat.Reducttreat;
import com.gxuwz.medical.exception.PersonNotFoundException;

public class ReducttreatDao extends GenericDao<Reducttreat> {
	@Override
	protected Reducttreat handle(ResultSet rs) throws SQLException {

		Reducttreat entity = new Reducttreat();
		entity.setChronicInfoId(rs.getString("chronicInfoId"));
		entity.setId(rs.getInt("id"));
		entity.setHosId(rs.getString("hosId"));
		entity.setMoney(rs.getInt("money"));
		entity.setFreemoney(rs.getInt("freemoney"));
		entity.setReductstatus(rs.getInt("reductstatus"));
		entity.setTreattime(rs.getString("treattime"));

		try {
			entity.setChronicInfo(new ChronicInfo(rs.getString("id")));
		} catch (Exception e) {
			e.printStackTrace();
		}

		return entity;

	}
}
